﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

namespace BonjourHotel.Application.Controls.Reservation
{
    public partial class Scheduler : System.Web.UI.UserControl
    {
        private const string ProviderSessionKey = "Telerik.Web.Examples.Scheduler.Outlook2007.DefaultCS";
        XmlSchedulerProvider Provider
        {
            get
            {
                XmlSchedulerProvider provider = (XmlSchedulerProvider)Session[ProviderSessionKey];
                if (Session[ProviderSessionKey] == null || !IsPostBack)
                {
                    provider = new XmlSchedulerProvider();//Server.MapPath("~/App_Data/Appointments_Outlook.xml"), false);
                    Session[ProviderSessionKey] = provider;
                }

                return provider;
            }
        }

        protected void Page_Init(object sender, EventArgs e)
        {
            RadScheduler.Provider = Provider;
        }
    }
}